package com.caltco.cargo.ops.common.base;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.Date;

/**
 * description: 基础实体类
 * date: 2023/1/12 17:17
 * author: yehao
 * version: 1.0
 */
@Data
public class BaseEntity {

    /**
     * 创建时间
     *
     */
    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT)
    private Date createAt;

    @Schema(description = "创建id")
    @TableField(fill = FieldFill.INSERT)
    private Long createId;


    /**
     * 创建人姓名
     *
     */
    @Schema(description = "创建人姓名")
    @TableField(fill = FieldFill.INSERT)
    private String createName;

    /**
     * 修改时间
     *
     */
    @Schema(description = "修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateAt;


    /**
     * 修改人姓名
     *
     */
    @Schema(description = "修改人姓名")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updateName;

    @Schema(description = "修改id")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateId;
}
